The Coast of Searching in General Trees versus Complete Binary Trees

نویسندگان

  • Yosi Ben-Asher
  • Eitan Farchi
چکیده

We consider the problem of searching in natural families of trees. A search in a tree T is a sequence of queries used to locate a pre-designated node called the \buggy" node. A query is made to any subtree in T. If the queried subtree contains the buggy node, then we restrict the search to that subtree, otherwise the search is restricted to the complement of that subtree in T. Two problems are considered, estimating the cost of an optimal search and devising fast algorithms that compute reasonably good search strategies. It follows that for general trees the cost is (log d+1 d n), where d is the maximal degree and n is the size of the tree. For the restricted family of complete binary trees, the cost of the optimal search is reduced to O(log n+log n). We also describe a fast algorithm that computes a search strategy with cost of O(log n + log log n) for complete binary trees. Finally, we give a simple fast algorithm that computes an optimal search strategy for the special case of top-down search. Computing this strategy can be done in O(n) steps, where n is the size of the underlying tree. Search in trees is often encountered in program testing or debugging. The bug should be found by searching the syntax tree of the program using a minimal set of queries. Another area where search problems appear is searching in classiied large tree-like data bases (e.g. the Yahoo's data base of the Internet).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A New Heuristic Algorithm for Drawing Binary Trees within Arbitrary Polygons Based on Center of Gravity

Graphs have enormous usage in software engineering, network and electrical engineering. In fact graphs drawing is a geometrically representation of information. Among graphs, trees are concentrated because of their ability in hierarchical extension as well as processing VLSI circuit. Many algorithms have been proposed for drawing binary trees within polygons. However these algorithms generate b...

متن کامل

P´olya Urn Models and Connections to Random Trees: A Review

This paper reviews P´olya urn models and their connection to random trees. Basic results are presented, together with proofs that underly the historical evolution of the accompanying thought process. Extensions and generalizations are given according to chronology: • P´olya-Eggenberger’s urn • Bernard Friedman’s urn • Generalized P´olya urns • Extended urn schemes • Invertible urn schemes ...

متن کامل

Profile and Height of Random Binary Search Trees

The purpose of this article is to survey recent results on distributional properties of random binary search trees. In particular we consider the profile and the height.

متن کامل

Probabilistic analysis of the asymmetric digital search trees

In this paper, by applying three functional operators the previous results on the (Poisson) variance of the external profile in digital search trees will be improved. We study the profile built over $n$ binary strings generated by a memoryless source with unequal probabilities of symbols and use a combinatorial approach for studying the Poissonized variance, since the probability distribution o...

متن کامل

A General Dynamic Function for the Basal Area of Individual Trees Derived from a Production Theoretically Motivated Autonomous Differential Equation

The management of forests may be motivated from production economic and environmental perspectives. The dynamically changing properties of trees affect environmental objectives and values of trees as raw material in the construction sector and in the energy sector. In order to optimize the management of forests, it is necessary to have access to reliable functions that predict how trees develop...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997